class FeatureTypeNode extends MyNode{
    constructor($state='new',...obj){
        super('FeatureType',$state,{
            name:"特征类别"
        },...obj);
    }

    getTypeName(){
        return "特征类别";
    }


    static loadTypes(){
        let session = neo4jService.getSession();
        let resultPromise = session.run(`MATCH (n:FeatureType) RETURN n`);
        resultPromise.then(result => {
            session.close();
            FeatureTypeNode.types = result.records
                .map((record) => record.get(0))
                .map(node => MyNode.fromNeo4jNode(node));
            for (let fn of FeatureTypeNode.loadTypes.callbacks){
                fn(FeatureTypeNode.types);
            }
        });
    }
}
FeatureTypeNode.types=[];
// ComponentNode.loadComponents();
FeatureTypeNode.loadTypes.callbacks=[];
